package com.example.sneakerappforme1105.bean;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.util.ArrayList;

@Entity(tableName = "tb_category")
public class Category {
    @PrimaryKey// 该字段是自增主键
    @NonNull
    Long categoryId;
    String name; // 类别名称

    public Category(String name) {
        this.name = name;
    }

    @NonNull
    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(@NonNull Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }




    public static String[] mNameArray = {"shoes","clothes"};


    public static ArrayList<Category> getDefaultList() {
        ArrayList<Category> catList = new ArrayList<>();
        for (int i = 0; i < mNameArray.length; i++) {
            Category info = new Category(mNameArray[i]);
            catList.add(info);
        }
        return catList;
    }


}
